test/reftests: Fix build on Visual Studio
authorChun-wei Fan <fanchunwei@src.gnome.org>
Mon, 1 Apr 2019 04:06:25 +0000 (12:06 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Mon, 1 Apr 2019 04:14:45 +0000 (12:14 +0800)
As we are building the gtkreftestprivate and reftest test libraries as
DLLs, we need to export the symbols in there so that things will link.

Decorate the symbols with G_MODULE_EXPORT for this purpose.

testsuite/reftests/gtk-reftest.h
testsuite/reftests/reftest-compare.h
testsuite/reftests/reftest-module.h
testsuite/reftests/reftest-snapshot.c
testsuite/reftests/reftest-snapshot.h

index e4da797626ebb687da8535aad791941b6b240f72..bb845e5711b676120f3540bb2ff9587efee01d0a 100644 (file)
@@ -21,7 +21,9 @@
 G_BEGIN_DECLS
 
 /* reftest-snapshot.c */
+G_MODULE_EXPORT
 extern void reftest_inhibit_snapshot   (void);
+G_MODULE_EXPORT
 extern void reftest_uninhibit_snapshot (void);
 
 G_END_DECLS
index b889e1659726ba7dfbfe69e092143d1a59a6fc9f..551b1c5a9291002a396b2049bede8aef44df9b0e 100644 (file)
@@ -22,6 +22,7 @@
 
 G_BEGIN_DECLS
 
+G_MODULE_EXPORT
 cairo_surface_t *       reftest_compare_surfaces        (cairo_surface_t        *surface1,
                                                          cairo_surface_t        *surface2);
 
index cd12657fc05b6023d7d8b95e4f07d9f91c5cd25f..222b46a6d1592456d55300703f46f3b08d2a75df 100644 (file)
@@ -24,13 +24,18 @@ G_BEGIN_DECLS
 
 typedef struct _ReftestModule ReftestModule;
 
+G_MODULE_EXPORT
 ReftestModule * reftest_module_new              (const char     *directory,
                                                  const char     *module_name);
+G_MODULE_EXPORT
 ReftestModule * reftest_module_new_self         (void);
 
+G_MODULE_EXPORT
 ReftestModule * reftest_module_ref              (ReftestModule  *module);
+G_MODULE_EXPORT
 void            reftest_module_unref            (ReftestModule  *module);
 
+G_MODULE_EXPORT
 GCallback       reftest_module_lookup           (ReftestModule  *module,
                                                  const char     *function_name);
 
index 7fb467b8ae8fee3d5a4b308a4cb4fdc907599215..231ff722e2b6ee5a89683d73d6923eacd9cd0d23 100644 (file)
@@ -64,13 +64,13 @@ quit_when_idle (gpointer loop)
 static gint inhibit_count;
 static GMainLoop *loop;
 
-void
+G_MODULE_EXPORT void
 reftest_inhibit_snapshot (void)
 {
   inhibit_count++;
 }
 
-void
+G_MODULE_EXPORT void
 reftest_uninhibit_snapshot (void)
 {
   g_assert (inhibit_count > 0);
index 178d2e8469817525da21fba128ae4f0e73317bdd..5a24388722348a4dfc396e04a0e292063faa85d1 100644 (file)
@@ -22,6 +22,7 @@
 
 G_BEGIN_DECLS
 
+G_MODULE_EXPORT
 cairo_surface_t *       reftest_snapshot_ui_file                (const char     *ui_file);
 
 G_END_DECLS